<template>
	<view class="search-container" :style="{backgroundColor : color}" @click="searchClick">
		<view class="search-item" :style="{borderRadius : radius + 'rpx'}">
			<uni-icons type="search"></uni-icons>
			<text>搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"ushop-search",
		data() {
			return {
				
			};
		},
		//组件支持自定义属性
		props:{
				
			color:{
				type:String,
				default:'#c00000'
			},
				
			radius:{
				type:Number,
				default:50
			}
		},
			
		methods:{
			searchClick(){
				this.$emit('click',{xx:'xx'})
			}
		}
	}
	
</script>

<style lang="scss">
		
	.search-container{
		height: 50px;
		// background-color: #c00000;
		.search-item{
			display: flex;
			height: 72rpx;
			margin: 0 16rpx;
			justify-content: center;
			align-items: center;
			background-color: white;
			// border-radius: 50rpx;
			font-size: 26rpx;
			
				
			text{
				margin-left: 10rpx;
			}
		}
	}

</style>
